fix(acp): deliver forum mentions under the default subscription - #5945
fix(acp): deliver forum mentions under the default subscription#5945Chessing234 wants to merge 4 commits into
Conversation
The kind list for `--subscribe mentions` was an inline `unwrap_or_else` closure buried in `tokio_main`, which is where a subscription gap can sit unnoticed for a long time. Lift it to `default_mention_kinds()` next to the other subscription helpers and pin the current coverage with a test, so any later edit to the list has to keep kind:9, workflow approvals and reminders deliberately rather than by accident. No behaviour change. Signed-off-by: Taksh <takshkothari09@gmail.com>
`--subscribe mentions` listened to kind:9, workflow approvals and reminders. A forum channel carries its conversation as kind:45001 posts and kind:45003 comments, so an agent on the default subscription was deaf in exactly the channels built for threaded discussion: it joined, logged the subscription, showed online, and an `@mention` in a forum post produced no inbound event at all (block#5268). Add both forum kinds to the default list. `--kinds` still overrides it wholesale, and the test added in the previous commit asserts the stream kinds are still covered, so this cannot quietly narrow. Signed-off-by: Taksh <takshkothari09@gmail.com>
themiguelamador
left a comment
There was a problem hiding this comment.
Requesting changes for two related default-subscription gaps:
default_mention_kinds()adds the forum kinds but still omitsKIND_STREAM_MESSAGE_V2(40002). That is a canonical message kind and the core/DB/desktop mention paths treat kinds9and40002together. As written, an ACP agent remains deaf to direct mentions in v2 stream messages under the default subscription.crates/buzz-acp/README.mdstill says forum traffic requires an explicit opt-in, and its--kindsexamples omit40002. Because--kindsreplaces the default list wholesale, following those examples preserves the same coverage hole.
I fixed both issues in 9c10866b1: the default now covers stream v1/v2, forum posts/comments, control, and slash commands, while the README accurately distinguishes default mentioned-forum delivery from an all-forum subscription.
Verification:
cargo fmt --all -- --checkcargo test -p buzz-acp --lib— 780 passedcargo clippy -p buzz-acp --all-targets -- -D warningsgit diff --check
…iption Review: `default_mention_kinds()` gained the forum kinds but still omitted `KIND_STREAM_MESSAGE_V2` (40002). Kinds 9 and 40002 are both canonical stream message kinds and the rest of the codebase treats them as a pair — `buzz-db`'s mentions query selects `(9, 40002, 45001, 45003)` together, and the relay's ingest path matches them in the same arm. With only 9 in the list an agent on the default subscription stays deaf to direct mentions in v2 stream messages: the same shape of bug this PR is fixing for forum channels, one kind over. - `cargo test -p buzz-acp --lib` — 781 passed - `cargo clippy -p buzz-acp --all-targets -- -D warnings` - `cargo fmt --all -- --check` Signed-off-by: Taksh <takshkothari09@gmail.com>
Review: the README still described forum traffic as requiring an explicit opt-in, which this change makes untrue for the mentioned case — a forum post or comment that @mentions the agent is now delivered by default. Its `--kinds` examples also omitted 40002. That matters more than it looks: `--kinds` replaces the default list wholesale rather than adding to it, so anyone following an example inherited the same coverage hole the previous commit just closed. The examples now carry the full set, and the note says explicitly that the flag replaces rather than extends. The section now distinguishes the two things it was conflating: mentioned forum delivery, which is the default, and an all-forum subscription including votes and unmentioned posts, which still needs `--no-mention-filter`. Signed-off-by: Taksh <takshkothari09@gmail.com>
|
Both right, one commit each. 1. 2. README. Rewritten. It now says mentioned forum delivery is the default and that what still needs opting in is all forum traffic — unmentioned posts and votes (45002), which are never mentions. Every Verification:
|
Fixes #5268.
An agent started with the default
--subscribe mentionssubscribed to kind:9 stream messages, workflow approval requests and reminders. Forum channels don't use kind:9 — their conversation is kind:45001 posts and kind:45003 comments — so an agent invited to a forum channel joined, logged the subscription and showed online, and then never received an event for an@mentionthere. From the outside it looks like the agent is ignoring you; there's nothing in the log to suggest the mention was filtered out, because it was never delivered in the first place.Both forum kinds are now in the default list.
--kindsstill overrides the default wholesale, so anyone who has narrowed it explicitly is unaffected.tokio_mainintodefault_mention_kinds()(first commit, no behaviour change) so it's testable and visible next to the other subscription helpers.Verified locally on the pinned 1.95.0 toolchain:
cargo test -p buzz-acp --lib— 780 passed (778 before, plus the two new)cargo clippy -p buzz-acp --all-targets -- -D warnings— cleancargo clippy --workspace --all-targets -- -D warnings— cleancargo fmt --all -- --check— cleanNote: I'm an outside contributor, so the workflow runs on this PR will sit at
action_requireduntil a maintainer approves them; only the DCO check reports on its own.